<?php $__env->startSection('content'); ?>

    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">上课记录</strong> /
                    <small>List</small>
                </div>
            </div>
            <?php echo $__env->make('admin._flash', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>



            <div class="am-g">
                <div class="am-u-sm-12">
                    <form class="am-form">
                        <table class="am-table am-table-striped am-table-hover table-main">
                            <thead>
                            <tr style="font-size: 1.6rem">
                                <th class="table-type">第几次到店</th>
                                <th class="table-type">客户姓名</th>
                                <th class="table-type">客户手机号</th>
                                <th class="table-type">挑战项目</th>
                                <th class="table-type">开始时间</th>
                                <th class="table-type">结束时间</th>
                                <th class="table-type">锻炼时长</th>
                                <th class="table-type">所属门店</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php $__currentLoopData = $packrecords; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k=> $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr data-id="111" style="font-size: 1.6rem">
                                    <td>
                                        <label class=" am-btn-secondary am-btn am-btn-xs am-radius" >
                                            <?php echo e($k+1); ?>

                                        </label>
                                    </td>
                                    <td>
                                        <label class=" am-btn-secondary am-btn am-btn-xs am-radius" >
                                            <?php echo e($p['packorder']['oncustomer_name']); ?>

                                        </label>
                                    </td>

                                    <td>
                                        <?php echo e($p['packorder']['oncustomer_tel']); ?>

                                    </td>

                                    <td>
                                        <?php echo e($p['packorder']['pack']['name']); ?>

                                    </td>
                                    <td>
                                        <?php echo e($p['inter_at']); ?>


                                    </td>
                                    <td>
                                        <?php echo e($p['out_at']); ?>


                                    </td>
                                    <td>
                                        <?php echo e($p['long']); ?>分
                                    </td>


                                    <td>
                                        <label class=" am-btn-danger am-btn am-btn-xs am-radius" >
                                            <?php echo e($p['packorder']['store']['name']); ?>

                                        </label>
                                    </td>



                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


                            </tbody>
                        </table>
                        

                        <div class="am-cf">
                            <div class="am-fr">
                                
                            </div>
                        </div>
                        <hr/>
                        <p>注：.....</p>
                    </form>
                </div>

            </div>
        </div>

        <footer class="admin-content-footer">
            <hr>
            <p class="am-padding-left">© 2014 AllMobilize, Inc. Licensed under MIT license.</p>
        </footer>

    </div>


<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
    <script src="/vendor/daterangepicker/moment.js"></script>
    <script src="/vendor/moment/locale/zh-cn.js"></script>
    <script src="/vendor/daterangepicker/daterangepicker.js"></script>

    <script>
        $(function () {
            //改变属性
            $('.change_attr').click(function () {
                var id = $(this).parents('tr').data('id');

                var _this = $(this);
                $.ajax({
                    type: 'PATCH',
                    url: '/admin/onbespeakorder/change_attr',
                    data: {id: id},
                    success: function () {
                        location.href = location.href;
                    }
                })
            })
            //时间插件
            $('#date_start').daterangepicker({

                "autoUpdateInput": false,
                "autoApply": true,
                "locale": {
                    "format": "YYYY-MM-DD",
                    "applyLabel": "确定",
                    "cancelLabel": "取消"
                }
            }, function (start, end, label) {
                this.element[0].value = start.format('YYYY-MM-DD') + ' ~ ' + end.format('YYYY-MM-DD');
            });





        });





    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin.application', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>